// Header items are the small icon links that pop up menus.

.euiHeaderSectionItem {
  position: relative;
  display: flex;
  align-items: center;

  &:after {
    position: absolute;
    content: '';
    top: $euiSize;
    bottom: 0;
    background: $euiBorderColor;
    left: 0;
  }
}

.euiHeaderSectionItem__button {
  position: relative; // For positioning the notification
  height: $euiHeaderChildSize;
  min-width: $euiHeaderChildSize;
  text-align: center;
  font-size: 0; // aligns icons better vertically

  &:hover {
    background: $euiColorLightestShade;
  }

  &:focus {
    background: $euiFocusBackgroundColor;
  }
}

.euiHeaderSectionItem--borderLeft {
  &:after {
    left: 0;
    width: 1px;
  }
}

.euiHeaderSectionItem--borderRight {
  &:after {
    width: 1px;
    left: auto;
    right: 0;
  }
}

.euiHeaderSectionItemButton__notification {
  position: absolute;
}

.euiHeaderSectionItemButton__notification--badge {
  top: 9%;
  right: 9%;
  box-shadow: 0 0 0 1px $euiHeaderBackgroundColor;
}

.euiHeaderSectionItemButton__notification--dot {
  top: 0;
  right: 0;
  stroke: $euiHeaderBackgroundColor;
}

@include euiBreakpoint('xs') {
  .euiHeaderSectionItem,
  .euiHeaderSectionItem__button {
    min-width: $euiHeaderChildSize * 0.75;
  }

  .euiHeaderSectionItem--borderLeft,
  .euiHeaderSectionItem--borderRight {
    &:after {
      display: none;
    }
  }

  // On small screens just show a small dot indicating there are notifications
  .euiHeaderSectionItemButton__notification--badge {
    @include size($euiSizeS);
    top: 20%;
    min-width: 0;
    border-radius: $euiSizeS;
    color: $euiColorAccent;
    overflow: hidden;
  }

  // Using specificty to override the default icon size
  .euiHeaderSectionItemButton__notification.euiHeaderSectionItemButton__notification--dot {
    @include size($euiSize);
    top: 9%;
  }
}
